package recite.word.service.base.common.exception;

import recite.word.service.base.common.enums.ResponseEnum;

public class ReciteException extends RuntimeException {
	private Integer code; // 异常状态码
	private String msg; // 异常信息

	public ReciteException() {
		super(ResponseEnum.FAILED.getDescription());
		this.code = ResponseEnum.FAILED.getCode();
		this.msg = ResponseEnum.FAILED.getDescription();
	}
	
	public ReciteException(String message) {
		super(message);
		this.code = ResponseEnum.FAILED.getCode();
		this.msg = message;
	}

	public ReciteException(String message, Throwable cause) {
		super(message, cause);
		this.code = ResponseEnum.FAILED.getCode();
		this.msg = message;
	}

	public ReciteException(String message, Integer code) {
		super(message);
		this.code = code;
		this.msg = message;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
	
	public String getMsg() {
		return msg;
	}

	public void setMsg(String message) {
		this.msg = message;
	}
}
